<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>重庆一厘米科技</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="重庆一厘米科技">
	<link rel="shortcut icon" href="/Public/images/logo.png">
    <meta name="author" content="SharpX">
    <link href="/Public/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <style type="text/css">
    @charset "utf-8";
	body {
		font:14px/1.5 "Microsoft Yahei","微软雅黑",Tahoma,Arial,Helvetica,STHeiti;
	}
    </style>
      <script type="text/javascript">
      var DocConfig = {
          host: window.location.origin,
          app: "<?php echo U('/');?>",
          pubile:"/Public",
      }

      DocConfig.hostUrl = DocConfig.host + "/" + DocConfig.app;
      </script>

  </head>
  <body>
<link rel="stylesheet" href="/Public/css/page/edit.css" />
<link rel="stylesheet" href="/Public/editor.md/css/editormd.css" />

<style type="text/css">
.btn-primary{
    background-color: #006dcc;
}
.btn-primary:hover{
    background-color: #04c;
}
#page_title , #cat_id , #order{
  height: 30px;
}
#cat_id {
  width: 150px;
}
#order{
  width:120px;
  margin-right: 20px;
}
</style>
<div id="layout">
    <!-- 顶部条 --> 
    <header class="row">
      <div class="head-left  pull-left">

        <ul class="inline">
          <li> <input type="text" name ="page_title" id="page_title" placeholder="请输入页面标题" value="<?php echo ($page["page_title"]); ?>">
          </li>
          <li>       
            上级目录：<select name="cat_id" id="cat_id"></select>
          </li>
          <li>       
            <input type="text" name ="order" id="order" value="<?php echo ($page["order"]); ?>" placeholder="可选：顺序数字">
          </li>
          <li>
            <a href="history?page_id=<?php echo ($page["page_id"]); ?>">历史版本</a>
          </li>
        </ul>

      </div>
      <div class="head-right pull-right">
        <a href="#" class="btn btn-primary " id="save">保存</a>
        <a href="../item/show?item_id=<?php echo ($item_id); ?>&page_id=<?php echo ($page["page_id"]); ?>" class="btn ">取消</a>
      </div>

    </header>
      <br>
      <!-- 插入模板的按钮组 -->
      <div class="btns" >
          <button id="api-doc">插入API接口模板</button>                    
          <button id="database-doc">插入数据字典模板</button>                    
      </div>

    <div id="editormd">
        <textarea id="page_content" style="display:none;"><?php echo ($page["page_content"]); ?></textarea>
    </div>
      <input type="hidden" id="item_id" value="<?php echo ($item_id); ?>">
      <input type="hidden" id="page_id" value="<?php echo ($page["page_id"]); ?>">
      <input type="hidden" id="default_cat_id" value="<?php echo ($page["cat_id"]); ?>">
  </div>

<!-- 模板存放的地方 -->
  <div id="api-doc-templ" style="display:none">
**简要描述：** 

- 用户注册接口

**请求URL：** 
- ` http://xx.com/api/user/register `
  
**请求方式：**
- POST 

**参数：** 

|参数名|必选|类型|说明|
|:----    |:---|:----- |-----   |
|username |是  |string |用户名   |
|password |是  |string | 密码    |
|name     |否  |string | 昵称    |

 **返回示例**

``` 
  {
    "error_code": 0,
    "data": {
      "uid": "1",
      "username": "12154545",
      "name": "吴系挂",
      "groupid": 2 ,
      "reg_time": "1436864169",
      "last_login_time": "0",
    }
  }
```

 **返回参数说明** 

|参数名|类型|说明|
|:-----  |:-----|-----                           |
|groupid |int   |用户组id，1：超级管理员；2：普通用户  |

 **备注** 

- 更多返回错误代码请看首页的错误代码描述

</div>
  <div id="database-doc-templ" style="display:none">
-  用户表，储存用户信息

|字段|类型|空|默认|注释|
|:----    |:-------    |:--- |-- -|------      |
|uid	  |int(10)     |否	|	 |	           |
|username |varchar(20) |否	|    |	 用户名	|
|password |varchar(50) |否   |    |	 密码		 |
|name     |varchar(15) |是   |    |    昵称     |
|reg_time |int(11)     |否   | 0  |   注册时间  |

- 备注：无

</div>

    
	<script src="/Public/js/common/jquery.min.js"></script>
    <script src="/Public/bootstrap/js/bootstrap.min.js"></script>
  </body>
</html> 
 <script src="/Public/editor.md/editormd.min.js"></script>
 <script src="/Public/js/page/edit.js"></script>